home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / linux / howto.networking.part3 < prev    next >
Encoding:
Text File  |  1995-07-25  |  37.7 KB  |  1,192 lines

  1. Subject: Linux NET-2 HOWTO (part 3/3)
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.help,comp.os.linux.admin,news.answers,comp.answers
  3. From: terryd@extro.ucc.su.oz.au (Terry Dawson)
  4. Date: Fri, 18 Nov 1994 17:13:11 GMT
  5.  
  6. Archive-name: linux/howto/networking/part3
  7. Last-modified: 18 Nov 94
  8.  
  9.  
  10. ---This is part 3/3---
  11.  
  12.      compress
  13.         to enable van Jacobsen header compression (cslip)
  14.  
  15.   Naturally these are mutually exclusive, you can use one or the other.
  16.   For more information on the other options available, refer to the man
  17.   pages.
  18.  
  19.  
  20.   11.2.1.4.  Configuring the /etc/slip.login file.
  21.  
  22.   After sliplogin has searched the /etc/slip.hosts and found a matching
  23.   entry, it will attempt to execute the /etc/slip.login file to actually
  24.   configure the slip interface with its ip address and netmask.
  25.  
  26.   The sample /etc/slip.login file supplied with the sliplogin package
  27.   looks like this:
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.   #!/bin/sh -
  42.   #
  43.   #       @(#)slip.login  5.1 (Berkeley) 7/1/90
  44.   #
  45.   # generic login file for a slip line.  sliplogin invokes this with
  46.   # the parameters:
  47.   #      1        2         3        4          5         6     7-n
  48.   #   slipunit ttyspeed loginname local-addr remote-addr mask opt-args
  49.   #
  50.   /sbin/ifconfig $1 $4 pointopoint $5 mtu 1500 -trailers up
  51.   /sbin/route add $5
  52.   exit 0
  53.  
  54.  
  55.  
  56.  
  57.   You will note that this script simply uses the ifconfig and route
  58.   commands to configure the slip device with its ipaddress, remote ip
  59.   address and netmask, and creates a route for the remote address via
  60.   the slip device. Just the same as you would if you were using the
  61.   slattach command.
  62.  
  63.  
  64.   11.2.1.5.  Configuring the /etc/slip.logout file.
  65.  
  66.   When the call drops out, you want to ensure that the serial device is
  67.   restored to its normal state so that future callers will be able to
  68.   login correctly.  This is achieved with the use of the
  69.   /etc/slip.logout file. It is quite simple, and again, I'll present the
  70.   sample included in the sliplogin package.
  71.  
  72.  
  73.  
  74.        #!/bin/sh -
  75.        #
  76.        #               slip.logout
  77.        #
  78.        /sbin/ifconfig $1 down
  79.        /sbin/route del $5
  80.        exit 0
  81.  
  82.  
  83.  
  84.  
  85.   All it does is `down' the interface and delete the manual route
  86.   previously created.
  87.  
  88.  
  89.   11.2.2.  Slip Server using dip.
  90.  
  91.   Let me start by saying that some of the information below came from
  92.   the dip man pages, where how to run Linux as a slip server is briefly
  93.   documented.
  94.  
  95.   To configure Linux as a slip server, you need to create some special
  96.   slip accounts for users, where dip (in slave mode) is used as the
  97.   login shell. Fred suggests that he has a convention of having all of
  98.   his slip accounts begin with a capital `S', eg `Sfredm'.
  99.  
  100.   Because the login program won't accept arguments to the login shell,
  101.   you will need to create a small program that looks like the following:
  102.  
  103.  
  104.  
  105.  
  106.  
  107.   /* dip-i.c - from a mail message of Karl kkeyte@esoc.bitnet */
  108.   int main()
  109.   {
  110.      execlp("dip", "dip", "-i", (char *) 0);
  111.   }
  112.  
  113.  
  114.  
  115.  
  116.   Compile it with: gcc -O dip-i.c -o dip-i
  117.  
  118.   Give it permissions 555. I recommend calling it /usr/bin/dip-i as
  119.   shown below.
  120.  
  121.   A sample /etc/passwd entry for a slip user looks like:
  122.  
  123.  
  124.  
  125.        Sfredm:ij/SMxiTlGVCo:1004:10:UUNET:/tmp:/usr/bin/dip-i
  126.        ^^         ^^        ^^  ^^   ^^    ^^   ^^
  127.        |          |         |   |    |     |    \__ shell program running
  128.        |          |         |   |    |     |         dip -i as login shell
  129.        |          |         |   |    |     \_______ Home directory
  130.        |          |         |   |    \_____________ User Full Name
  131.        |          |         |   \__________________ User Group ID
  132.        |          |         \______________________ User ID
  133.        |          \________________________________ Encrypted User Password
  134.        \___________________________________________ Slip User Login Name
  135.  
  136.  
  137.  
  138.  
  139.   After the user logs in, the login(1) program, if it finds and verifies
  140.   the user ok, will execute the shell program dip-i which will execute
  141.   the dip command in input mode (-i). dip now scans the
  142.   /etc/net/diphosts file for an entry for the given user name.
  143.   Therefore, each slip user must also have an entry in
  144.   /etc/net/diphosts.
  145.  
  146.   You will have to re-read section `Proxy Arp' to arrange for your
  147.   machine to proxy arp for the slip users who will be using your system
  148.   if you want them to have access to any network that your server
  149.   machine might be connected to.
  150.  
  151.  
  152.   11.2.2.1.  Configuring /etc/net/diphosts
  153.  
  154.   /etc/net/diphosts is used by dip to lookup preset configurations for
  155.   remote hosts. These remote hosts might be users dialing into your
  156.   linux machine, or they might be for machines that you dial into with
  157.   your linux machine.
  158.  
  159.   The general format for /etc/net/diphosts is as follows:
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.   Suwalt::145.71.34.1:SLIP uwalt:CSLIP,1006
  174.    ^    ^  ^            ^         ^     ^
  175.    |    |  |            |         |     \___ MTU
  176.    |    |  |            |         \_________ protocol (SLIP, CSLIP,
  177.    |    |  |            |                    KISS)
  178.    |    |  |            \___________________ comment field
  179.    |    |  \________________________________ IP address of the other
  180.    |    |                                    side, or host.domain.name
  181.    |    \___________________________________ unused (compat. with passwd)
  182.    \________________________________________ login name (as returned by
  183.                                              getpwuid(getuid()))
  184.  
  185.  
  186.  
  187.  
  188.   An example /etc/net/diphosts entry for a remote slip user might be:
  189.  
  190.  
  191.  
  192.        Sfredm::145.71.34.1:SLIP uwalt:SLIP,296
  193.  
  194.  
  195.  
  196.  
  197.   which specifies a slip link with MTU of 296, or
  198.  
  199.  
  200.  
  201.        Sfredm::145.71.34.1:SLIP uwalt:CSLIP,1006
  202.  
  203.  
  204.  
  205.  
  206.   which specifies a cslip-capable link with MTU of 1006.
  207.  
  208.   When a user logs in, they will receive a normal login, and password
  209.   prompt, at which they should enter their slip-login userid and
  210.   password. If they check out ok, then the user will see no special
  211.   messages, they should just change into slip mode at their end, and
  212.   then they should be able to connect ok, and be configured with the
  213.   parameters from the diphosts file.
  214.  
  215.  
  216.   11.3.  Using the Automounter Daemon - AMD.
  217.  
  218.   This section has been supplied by Mitch DSouza, and I've included it
  219.   with minimal editing, as he supplied it. Thanks Mitch.
  220.  
  221.  
  222.   11.3.1.  What is an automounter, and why would I use one ?
  223.  
  224.   An automounter provides a convenient means of mounting filesystems on
  225.   demand, i.e. when requried. This will reduce both the server and the
  226.   client load, and provides a great deal of flexibility even with non-
  227.   NFS mounts. It also offers a redundancy mechanism whereby a mount
  228.   point will automatically switch to a secondary server should a primary
  229.   one be unavailable. A rather useful mount called the union mount gives
  230.   the automounter the ability to merge the contents of multiple
  231.   directories into a single directory. The documentation msut be read
  232.   thoroughly to make full use of its extensive capabilities.
  233.  
  234.   A few important points must be remembered - (in no particular order):
  235.  
  236.  
  237.   o  amd maps are not compatible with Sun maps, which in turn are not
  238.      compatible with HP maps ad infinitum. The point here however is
  239.      that amd is freely available and compatible with all the systems
  240.      mentioned above and more, thus giving you the ability to share maps
  241.      if amd is installed throughout your network. Mitch uses it with a
  242.      mixture of Linux/Dec/NeXt/Sun machines.
  243.  
  244.   o  Sun automount maps can be converted to amd style maps by using the
  245.      perl script in the contrib directory - automount2amd.pl.
  246.  
  247.   o  You must have the portmapper running before starting amd.
  248.  
  249.   o  UFS mounts do not timeout.
  250.  
  251.   o  UFS mounts, in the case of Linux only, have been extended to deal
  252.      with all varieties of native filesystems (i.e. minix, ext, ext2,
  253.      xiafs ...) with the default being minix. This undocumented feature
  254.      is accessed in the opts option like:
  255.  
  256.  
  257.         ..., opts:=type=msdos,conv=auto
  258.  
  259.  
  260.  
  261.  
  262.   o  Do not mount over existing directories unless you use a direct
  263.      automount option, otherwise it is like mounting your disk on /home
  264.      when some user directory is /home/fred.
  265.  
  266.   o  Always turn on full logging with the `-x all' option to amd if you
  267.      have any troubles. Check also what the command:
  268.  
  269.  
  270.        % amq -ms
  271.  
  272.  
  273.  
  274.  
  275.   reports, as it will indicate problems as they occur.
  276.  
  277.   o  GNU getopt() is too clever for its own good sometimes. You should
  278.      always use `--' before the non-options e.g.
  279.  
  280.  
  281.        # /etc/amd -x all -l syslog -a /amd -- /net /etc/amd.net
  282.  
  283.  
  284.  
  285.  
  286.  
  287.   11.3.2.  Where to get AMD, the automounter daemon.
  288.  
  289.   amd can be obtained from:
  290.  
  291.   sunsite.unc.edu
  292.  
  293.  
  294.        /pub/Linux/system/Misc/mount/amd920824upl67.tar.gz
  295.  
  296.  
  297.  
  298.  
  299.   This contains ready-to-run binaries, full sources and documentation in
  300.   texinfo format.
  301.  
  302.  
  303.  
  304.  
  305.   11.3.3.  An example AMD configuration.
  306.  
  307.   You do not configure the automounter from the /etc/fstab file, which
  308.   you will already be using to contain information about your
  309.   fileystems, instead it is command line driven.
  310.  
  311.   To mount two nfs filesystems using your /etc/fstab file you would use
  312.   two entries that looked like:
  313.  
  314.  
  315.  
  316.        server-1:/export/disk  /nfs/server-1  nfs  defaults
  317.        server-2:/export/disk  /nfs/server-2  nfs  defaults
  318.  
  319.  
  320.  
  321.  
  322.   i.e. you were nfs mounting server-1 and server-2 on your linux disk on
  323.   the /nfs/server-1 and /nfs/server-2 directories.
  324.  
  325.   After commenting out, or deleting the above lines from your /etc/fstab
  326.   file, you could amd to perform the same task with the following
  327.   syntax:
  328.  
  329.  
  330.  
  331.        /etc/amd -x all -l syslog -a /amd -- /nfs /etc/amd.server
  332.        |      | |    | |       | |     |  | |  | |             |
  333.        |      | |    | |       | |     |  | |  | |             |
  334.        `------' `----' `-------' `-----' -' `--' `-------------'
  335.         |        |      |         |      |   |    |
  336.         (1)      (2)    (3)       (4)    (5) (6)  (7)
  337.  
  338.  
  339.  
  340.  
  341.   Where:
  342.  
  343.  
  344.   1. The full amd binary path (obviously optional) depending on your
  345.      $PATH setting, so just `amd' may be specified here.
  346.  
  347.   2. `-x all' means turn full logging on. Read the documentation for the
  348.      other logging levels
  349.  
  350.   3. `-l syslog' means log the message via the syslog daemon. This could
  351.      mean put it to a file, dump it, or pass it, to an unused tty
  352.      console. This (syslog) can be changed to the name of a file, i.e.
  353.      `-l foo' will record to a file called foo.
  354.  
  355.   4. `-a /amd' means use the /amd directory as a temporary place for
  356.      automount points. This directory is created automatically by amd
  357.      and should be removed before starting amd in your /etc/rc scripts.
  358.  
  359.   5. `--' means tell getopt() to stop attempting to parse the rest of
  360.      the command line for options. This is especially useful when
  361.      specifying the `type:=' options on the command line, otherwise
  362.      getopt() tries to decode it incorrectly.
  363.  
  364.   6. `/nfs' is the real nfs mount point. Again this is automatically
  365.      created and should not generally contain subdirectories unless the
  366.      `type:=direct' option is used.
  367.  
  368.   7. The amd map (i.e. a file) named `amd.server' contains the lines:
  369.  
  370.  
  371.   # /etc/amd.server
  372.   /defaults    opts:=rw;type:=nfs
  373.   server-1     rhost:=server-1;rfs:=/export/disk
  374.   server-2     rhost:=server-2;rfs:=/export/disk
  375.  
  376.  
  377.  
  378.  
  379.  
  380.   Once started and successfully running, you can query the status of the
  381.   mounts with the command:
  382.  
  383.  
  384.  
  385.        % amq -ms
  386.  
  387.  
  388.  
  389.  
  390.   Now if you say:
  391.  
  392.  
  393.  
  394.        % ls /nfs
  395.  
  396.  
  397.  
  398.  
  399.   you should see no files. However the command:
  400.  
  401.  
  402.  
  403.        % ls /nfs/server-1
  404.  
  405.  
  406.  
  407.  
  408.   will mount the host `server-1' automatically. voila! amd is running.
  409.   After the default timeout has expired, this will automatically be
  410.   unmounted. Your /etc/password file could contain entries like:
  411.  
  412.  
  413.  
  414.         ...
  415.        linus:EncPass:10:0:God:/nfs/server-1/home/linus:/bin/sh
  416.        mitch:EncPass:20:10:Mitch DSouza:/nfs/server-1/home/mitch:/bin/tcsh
  417.        matt:EncPass:20:10:Matt Welsh:/nfs/server-1/home/matt:/bin/csh
  418.  
  419.  
  420.  
  421.  
  422.   which would mean that when Linus, Matt, or Mitch are logged in, their
  423.   home directory will be remotely mounted from the appropriate server,
  424.   and umounted when they log out.
  425.  
  426.  
  427.   11.4.  Using Linux as a router
  428.  
  429.   Linux will function just fine as a router. You should run a routing
  430.   daemon such as gated, or if you have simple routing requirements use
  431.   hard coded routes. If you are using a late version kernel (1.1.*) then
  432.   you should ensure that you have answered `y' to:
  433.  
  434.  
  435.  
  436.  
  437.   IP forwarding/gatewaying (CONFIG_IP_FORWARD) [y] y
  438.  
  439.  
  440.  
  441.  
  442.   when building your kernel.
  443.  
  444.   Olaf Kirch's Network Administrators Guide discusses network design and
  445.   routing issues, and you should read it for more information. A
  446.   reference to it is in the "Related Documentation" section of this
  447.   document.
  448.  
  449.  
  450.   12.  Experimental and Developmental modules.
  451.  
  452.   There are a number of people developing new features and modules for
  453.   the Linux networking code. Some of these are in quite an advanced
  454.   state (read working), and it is these that I intend to include in this
  455.   section until they are standard release code, when they will be moved
  456.   forward.
  457.  
  458.  
  459.   12.1.  AX.25 - A protocol used by Amateur Radio Operators.
  460.  
  461.   The AX.25 protocol is used by Amateur Radio Operators worldwide.  It
  462.   offers both connected and connectionless modes of operation, and is
  463.   used either by itself for point-point links, or to carry other
  464.   protocols such as tcp/ip and netrom.
  465.  
  466.   It is similar to X.25 level 2 in structure, with some extensions to
  467.   make it more useful in the amateur radio environment.
  468.  
  469.   Alan Cox has developed some kernel based AX.25 software support for
  470.   Linux and these are available in ALPHA form for you to try. Alan's
  471.   code supports both KISS based TNC's (Terminal Node Controllers), and
  472.   the Z8530 SCC driver.
  473.  
  474.   The User programs contain a P.M.S. (Personal Message System), a beacon
  475.   facility, a line mode connect program, and `listen' an example of how
  476.   to capture all AX.25 frames at RAW interface level.
  477.  
  478.   Be sure to read /usr/local/ax25/README as it contains more complete
  479.   information regarding this software.
  480.  
  481.  
  482.   12.1.1.  Where to obtain the AX.25 software.
  483.  
  484.   The AX.25 software is available from:
  485.  
  486.   sunacm.swan.ac.uk
  487.  
  488.  
  489.        /pub/misc/Linux/Radio/*
  490.  
  491.  
  492.  
  493.  
  494.   You will find a number of directories, each containing different
  495.   versions of the code. Since it is closely linked with the kernel code,
  496.   you will need to ensure that you choose the version appropriate for
  497.   the kernel version you are running. The following table shows the
  498.   mapping between the two:
  499.  
  500.  
  501.  
  502.  
  503.   AX25007                 Prehistoric
  504.   AX25010                 Obsolete
  505.   AX25012                 for release 1.0.* kernels and higher
  506.   AX25016                 for release 1.1.5 kernels
  507.   AX25017                 for release 1.1.6 kernels
  508.   AX25018
  509.   AX25021
  510.   AX25022                 for release 1.1.28 kernels
  511.  
  512.  
  513.  
  514.  
  515.   In each directory you will find at least two files, one called
  516.   something like krnl022.tgz, and the other called something like
  517.   user022.tgz.  These are the kernel software, and the user programs
  518.   respectively.
  519.  
  520.  
  521.   12.1.2.  Installing the AX.25 software.
  522.  
  523.   The software comes in two parts, the kernel drivers, and the user
  524.   programs.
  525.  
  526.  
  527.   12.1.2.1.  The kernel drivers.
  528.  
  529.   To install the kernel drivers, do the following:
  530.  
  531.  
  532.  
  533.        # cd /usr/src
  534.        # gzip -dc krnl022.tgz | tar xvf -
  535.  
  536.  
  537.  
  538.  
  539.   you will need to uncomment the CONFIG_AX25 define in the
  540.   /usr/src/linux/config.in file.
  541.  
  542.   You should then:
  543.  
  544.  
  545.  
  546.        # cd /usr/src/linux
  547.        # make config
  548.        # make dep;make
  549.  
  550.  
  551.  
  552.  
  553.   Be sure to answer `yes' when you are asked if you should include the
  554.   AX.25 support in the make config step. You will also need to answer
  555.   `yes' to inluding SLIP if you want the AX.25 code to support a KISS
  556.   TNC.
  557.  
  558.  
  559.   12.1.2.2.  The user programs.
  560.  
  561.   To install the user programs you should try:
  562.  
  563.  
  564.  
  565.        # cd /
  566.        # gzip -dc user022.tgz | tar xvvof -
  567.  
  568.  
  569.   You should then:
  570.  
  571.  
  572.  
  573.        # cd /usr/local/ax25/src
  574.        # make install
  575.  
  576.  
  577.  
  578.  
  579.  
  580.   12.1.3.  Configuring and using the AX.25 software.
  581.  
  582.   Configuring an AX.25 port is very similar to configuring a slip
  583.   device.  The AX.25 software has been designed to work with a TNC in
  584.   kiss mode. You will need to have the TNC preconfigured and connected.
  585.  
  586.   You use the axattach program in much the same way as you would use the
  587.   slattach program. For example:
  588.  
  589.  
  590.  
  591.        # /usr/local/ax25/bin/axattach -s 4800 /dev/cua1 VK2KTJ &
  592.  
  593.  
  594.  
  595.  
  596.   would configure your /dev/cua1 serial device to be a kiss interface at
  597.   4800 bps, with the hardware address VK2KTJ.
  598.  
  599.   You would then use the ifconfig program to configure the ip address
  600.   and netmask as for an ethernet device:
  601.  
  602.  
  603.  
  604.        # /sbin/ifconfig sl0 44.136.8.5
  605.        # /sbin/ifconfig sl0 netmask 255.255.255.0
  606.        # /sbin/ifconfig sl0 broadcast 44.136.8.255
  607.        # /sbin/ifconfig sl0 arp mtu 257 up
  608.  
  609.  
  610.  
  611.  
  612.   To test it out, try the following:
  613.  
  614.  
  615.  
  616.        /usr/local/ax25/bin/call VK2DAY via VK2RVT
  617.  
  618.  
  619.  
  620.  
  621.   The call program is a linemode terminal program for making ax.25
  622.   calls. It recognises lines that start with ` ' as command lines.  The
  623.   ` .' command will close the connection.
  624.  
  625.   You also need to configure some items such as the window to use. This
  626.   necessitates editing only one file. Edit the /usr/local/ax25/etc/ports
  627.   file. This is an ascii file containing one line for each AX.25 port.
  628.   You must have the entries in this file in the same order as you
  629.   configure your AX.25 interfaces.
  630.  
  631.   The format is as follows:
  632.  
  633.  
  634.  
  635.   callsign baudrate window frequency
  636.  
  637.  
  638.  
  639.  
  640.   At this stage not much of this information is used, it will be picked
  641.   up and used in later developments.
  642.  
  643.   I haven't had a chance to try this code out yet. Please refer to the
  644.   man pages in /usr/local/ax25/man and the README file in
  645.   /usr/local/ax25 for more information.
  646.  
  647.  
  648.   12.2.  Z8530 SCC driver.
  649.  
  650.   The Zilog Z8530 SCC provides Synchronous/Asynchronous, HDLC, NRZI
  651.   encoding and other capabilities. There are a number of peripheral
  652.   cards that use the Z850 as the basis of their design. A driver has
  653.   been written by Joerg Reuter, <dl1bke@melaten.ihf.rwth-aachen.de>, and
  654.   is available on:
  655.  
  656.   ftp.ucsd.edu
  657.  
  658.  
  659.        /hamradio/packet/tcpip/incoming/sccdrv-1.4a.dl1bke.tar.gz
  660.  
  661.  
  662.  
  663.  
  664.   Please read the README file that accompanies the driver for more
  665.   details.
  666.  
  667.  
  668.   12.3.  Ottawa PI/PI2 card driver.
  669.  
  670.   The Ottawa PI card is a Z8530 SCC based card for IBM PC type machines
  671.   that is in common usage by Amateur Radio operators worldwide. While it
  672.   is most commonly used by Amateur Radio Operators, it could be pressed
  673.   into service in other fields where it is desirable to have the
  674.   features of a Z8530. It supports a high speed half duplex (single DMA
  675.   channel) port, and a low speed (<19.2kbps interrupt driven) full
  676.   duplex port. The PI2 is a new version of the card that supports an on
  677.   board radio modem, and improved hardware design.
  678.  
  679.   A driver for this card has been written by David Perry,
  680.   <dp@hydra.carleton.edu>, and is available from:
  681.  
  682.   hydra.carleton.ca
  683.  
  684.  
  685.        /pub/hamradio/packet/tcpip/linux/pi2-0.5ALPHA.tgz
  686.  
  687.  
  688.  
  689.  
  690.   Please read the README file that accompanes the driver for more
  691.   details.
  692.  
  693.  
  694.   12.4.  NIS - Sun Network Information System.
  695.  
  696.   There are in fact two NIS implementations being distributed. Firstly
  697.   there is a rudimentary implementation in the standard libc ditribution
  698.   which however requires binding to servers via ypbind before use.  A
  699.   more clean implementation tending towards the NIS+ implementation is
  700.   called NYS, is written by Peter Eriksson, <pen@lysator.liu.se> and is
  701.   available from:
  702.  
  703.   ftp.funet.fi
  704.  
  705.  
  706.        /pub/OS/Linux/BETA/NYS/nys-0.26.tar.gz
  707.  
  708.  
  709.  
  710.  
  711.   An NIS style server can be retrieved from:
  712.  
  713.   ftp.funet.fi
  714.  
  715.  
  716.        /pub/OS/Linux/BETA/NYS/ypserv-0.5.tar.gz
  717.  
  718.  
  719.  
  720.  
  721.   Check there are no newer versions, as this information might now be
  722.   slightly dated.
  723.  
  724.   Both of these are fully functional and they have been used extensively
  725.   with no troubles to query Sun servers for NIS information like
  726.   passwd/hosts/group etc.  and don't require binding to arbitrary
  727.   servers. In fact they allow you to specify servers for services and
  728.   have the ability to select a yp/dns/file option for name/passwd/etc.
  729.   resolution of specific services. They are extremely easy to set up,
  730.   and recommended for client machines integrating into larger networks.
  731.  
  732.   Clearly your network daemons and clients need to be recompiled to link
  733.   with the shared library libnsl.so to make use of the YP facilities.
  734.   This is fairly trivial and an NYS package of all network clients and
  735.   daemons is currently being compiled.
  736.  
  737.   If you have more detailed information on NIS, please email me.
  738.  
  739.  
  740.   12.5.  snmp agent.
  741.  
  742.   There is an experimental snmp agent for linux, ported by Erik
  743.   Schoenfelder, <schoenfr@ibr.cs.tu-bs.de>.
  744.  
  745.   It is available from:
  746.  
  747.   ftp.ibr.cs.tu-bs.de
  748.  
  749.  
  750.        /pub/local/cmu-snmp2.1.2l2.tar.gz
  751.  
  752.  
  753.  
  754.  
  755.   Please read the file called cmu-snmp2.1.2l2.README, as it contains
  756.   information that you will need to know about the package.
  757.  
  758.   This package provides a nearly complete MIB-II variable set. At this
  759.   stage though, you can only read variables, not set them.
  760.  
  761.   nstat.tar.gz contains a formatter of the output from /proc/net/snmp
  762.   called nstat.
  763.  
  764.   You will need to be running either a new version kernel, or apply
  765.   patches to your kernel source. Details are in the README file.
  766.  
  767.   12.6.  Experimental ARCNet driver
  768.  
  769.   There have been a number of people looking for a driver for ARCNet
  770.   cards.  ARCNet cards provide only rates of about 2Mbps, but are
  771.   capable of being supported via longer length cables than for 10base2
  772.   (thinnet) type lans. ARCNet cards are also likely to be fairly cheap,
  773.   as many businesses are gradually replacing their ARCNet networks with
  774.   other lan types.
  775.  
  776.   Avery Pennarun <apenwarr@tourism.807-city.on.ca> has produced an
  777.   experimental ARCNet driver for Linux. It is ALPHA which means you
  778.   should try it knowing that it probably still contains many errors and
  779.   might even cause you other problems like kernel hangs.
  780.  
  781.   The source code and kernel patch for the driver are available at:
  782.  
  783.   sunsite.unc.edu
  784.  
  785.  
  786.        /pub/Linux/system/Network/drivers/arcnet-0.12.tar.gz
  787.  
  788.  
  789.  
  790.  
  791.   Note: For ease of patching you will require kernel version 1.1.51 as
  792.   this is what the patch was made against, though it might also work
  793.   either 1.1.45 and up.
  794.  
  795.   There are some known bugs, you can obtain details of these by reading
  796.   the top of the arcnet.c file.
  797.  
  798.   Avery is now at the stage where he needs people to try the driver to
  799.   discover any bugs or problems that he hasn't been able to find, and to
  800.   guage how well it works in other environments.  Avery will happily
  801.   accept any reports via the NET channel, or by email to home at either
  802.   <apenwarr@tourism.807-city.on.ca>, or <Avery.Pennarun@NorLinK.Com>.
  803.   Avery has problems with News, so bug reports via any of the Linux
  804.   newsgroups might not make it to him.  Avery wants to know not only if
  805.   you have problems, but also if you have success.
  806.  
  807.  
  808.   12.7.  Experimental Token Ring driver
  809.  
  810.   An experimental Token Ring driver is being developed by Peter De
  811.   Schrijver <stud11@cc4.kuleuven.ac.be>. His latest version, at the time
  812.   of writing was available at:
  813.  
  814.   sunsite.unc.edu
  815.  
  816.  
  817.        /pub/Linux/Incoming/linux-1.1.44-TR.tar.gz
  818.  
  819.  
  820.  
  821.  
  822.  
  823.   12.8.  V.35 interface board
  824.  
  825.   V.35 is a C.C.I.T.T. standard interface that provides a high speed
  826.   balanced serial interface suitable for speeds up to about 2 Mbps. The
  827.   use of differential pair balanced transmission allows the V.35
  828.   interface to support longer cables than can the more familiar
  829.   V.24/RS232C type interface and higher data rates.
  830.  
  831.   Pete Kruckenberg <kruckenb@sal.cs.utah.edu> located a company that
  832.   supplies V.35 interface hardware for ISA bus machines. The company is
  833.   also developing a Linux driver for this card that is nearing Beta
  834.   testing stage.  This would allow you to directly connect your Linux
  835.   machine to a 48/56kbps synchronous leased line. The card supports
  836.   multiple protocols and allows for interface speeds of up to 12 Mbps.
  837.  
  838.   More information is available from:
  839.  
  840.   ftp.std.com
  841.  
  842.  
  843.        pub/sdl/n2
  844.  
  845.  
  846.  
  847.  
  848.   or you can email Dale Dhillon <sdl@world.std.com>
  849.  
  850.  
  851.   12.9.  Slip Management Suite
  852.  
  853.   Matthew Dillon, dillon@apollo.west.oic.com has assembled a suite of
  854.   programs for managing slip connections, both incoming and outgoing.
  855.   Some of the software's features are automatic dialling out, automatic
  856.   redial on failure, and shifting between slip connections on a single
  857.   serial port.
  858.  
  859.   Matt has tested the code with version 1.1.x kernels, but says it
  860.   should also compile and run ok with version 1.0.x kernels.
  861.  
  862.   You can obtain the software from: ftp.west.oic.com
  863.   (ftp://ftp.west.oic.com/pub/linux/dillon_src/dslip203.tgz) or from:
  864.   sunsite.unc.edu
  865.   (ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/dslip203.tgz)
  866.  
  867.  
  868.   12.10.  tcpdump utility
  869.  
  870.   Adam Caldwell <acaldwel@103mort2.cs.ohiou.edu> has ported the tcpdump
  871.   to linux. tcpdump allows you to take traces of network activity by
  872.   intercepting the datagrams on their way in and out of your machine.
  873.   This is useful for diagnosing difficult to identify network problems.
  874.  
  875.   Both binary and sources are available, and version 3.0 has been tested
  876.   on kernel versions 0.99.15, 1.0.8 and 1.1.28.
  877.  
  878.   You can find the source and binaries at: 103mor2.cs.ohiou.edu
  879.   (ftp://103mort2.cs.ohiou.edu/linux/tcpdump-3.0-linux-src.tar.gz) or
  880.   from: sunsite.unc.edu
  881.   (ftp://sunsite.unc.edu/pub/Linux/system/Network/tcpdump-3.0-linux-
  882.   src.tar.gz)
  883.  
  884.  
  885.  
  886.   13.  Some Frequently Asked Questions, with brief Answers.
  887.  
  888.   Following are some questions and answers that are commonly asked.
  889.  
  890.  
  891.   13.1.  General questions:
  892.  
  893.  
  894.  
  895.      I have only a dialin terminal access to a machine on the net, can I
  896.         use
  897.         this as a network connection ?"  Yes you can, take a look at
  898.         TERM. TERM allows you you to run network connections over a
  899.         normal terminal session. It requires some modifications to the
  900.         network applications to work with it, but binaries and sources
  901.         are available for the most common ones already. take a look at
  902.         the TERM-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/Term-
  903.         HOWTO.html) for lots more information.
  904.  
  905.  
  906.      I want to build my own standalone network, what addresses do I use
  907.         ?
  908.         RFC1597 has specifically reserved some IP addresses for private
  909.         networks.  You should use these as they prevent anything nasty
  910.         happening if you accidentally get connected to the Internet. The
  911.         addresses reserved are:
  912.  
  913.  
  914.           10.0.0.0        -   10.255.255.255
  915.           172.16.0.0      -   172.31.255.255
  916.           192.168.0.0     -   192.168.255.255
  917.  
  918.  
  919.  
  920.  
  921.      Note, reserved network addresses are of classes A, B and C, so you
  922.      are not restricted in your network design or size. Since you won't
  923.      be connecting to the Internet it doesn't matter if you use the same
  924.      address as some other group or network, just so long as the
  925.      addresses you use are unique within your network.
  926.  
  927.  
  928.      If sunacm.swan.ac.uk is down, how do I get the files specified ?
  929.         `sunacm' is mirrored on:
  930.  
  931.         ftp.Uni-Mainz.DE
  932.  
  933.  
  934.           /pub/Linux/packages/Net2Debugged
  935.  
  936.  
  937.  
  938.  
  939.  
  940.      How do I know what version of kernel/net code I am running ?
  941.         The network code and kernel now have synchronised version
  942.         numbers, so try:
  943.  
  944.         uname -a
  945.  
  946.         or:
  947.  
  948.         cat /proc/version
  949.  
  950.  
  951.   13.2.  Error messages:
  952.  
  953.  
  954.  
  955.      I keep getting the error `eth0: transmit timed out'. What does this
  956.         mean?
  957.         This usually means that your Ethernet cable is unplugged, or
  958.         that the setup parameters for your card (I/O address, IRQ, etc.)
  959.         are not set correctly.  Check the messages at boot time and make
  960.         sure that your card is recognized with the correct Ethernet
  961.         address. If it is, check that there is no conflict with any
  962.         other hardware in your machine, eg you might have a soundblaster
  963.         sharing the same IRQ or i/o control port.
  964.  
  965.      I get errors `check Ethernet cable' when using the network.
  966.         You probably have your Ethernet card configured incorrectly.
  967.         Double check the settings in /usr/src/linux/drivers/net/CONFIG.
  968.         If this checks out ok, you may in fact have a cabling problem,
  969.         check the cables are plugged in securely.
  970.  
  971.  
  972.  
  973.   13.3.  Routing questions:
  974.  
  975.  
  976.  
  977.      Why do I get the message `obselete route request' when I use the
  978.         route command ?
  979.         You are using a version of route that is older than your kernel.
  980.         You should upgrade to a newer version of route. Refer to the
  981.         "The network configuration tool suite" section of this document
  982.         for information on where to obtain the tool set.
  983.  
  984.  
  985.      Why do I get a `network unreachable' message when I try and net-
  986.         work?
  987.         This message means that yours, or some other, machine doesn't
  988.         know how to route to the host that you are attempting to ping or
  989.         connect to. If it occurs for all hosts that you try, then it is
  990.         probable that you don't have your default route set up properly,
  991.         reread the `routing' section.
  992.  
  993.  
  994.      I can ping my server/gateway, but can't ping or connect to anyone
  995.         remote.
  996.         This is probably due to a routing problem. Reread the `routing'
  997.         section in this document. If this looks ok, then make sure that
  998.         the host you are attempting to connect to has a route to you. If
  999.         you are a dialin user then this is a common cause of problems,
  1000.         ensure that your server is either running a routing program like
  1001.         gated or routed, or that it is `prox arping' for you, otherwise
  1002.         you will be able to get datagrams to the remote host, but it
  1003.         won't know how to return datagrams to you.
  1004.  
  1005.  
  1006.  
  1007.   13.4.  Using Linux with fileservers/NFS:
  1008.  
  1009.  
  1010.  
  1011.      How do I use my existing Novell fileserver with my Linux machine ?
  1012.         If you have the Novell NFS Daemon code then it is easy, just NFS
  1013.         mount the Novell volume that you wish to use. If you don't, and
  1014.         you are really desperate to be able to do this, and you have a
  1015.         spare pc machine laying about, you are in luck. You can run a
  1016.         program called Stan's Own Server on the spare PC. First,
  1017.         configure the pc as a novell workstation with maps to the
  1018.         directories you want to nfs mount, then run SOS, and export
  1019.         those drive maps.  SOS is available from
  1020.         spdcc.com:pub/sos/sossexe.zoo
  1021.  
  1022.  
  1023.      Files get corrupted when running NFS over a network.
  1024.         Certain vendors (Sun primarily) shipped many machines running
  1025.         NFS without UDP checksums. Great on ethernet, suicide otherwise.
  1026.         UDP checksums can be enabled on most file servers. Linux has it
  1027.         enabled by default from pl13 onwards - but both ends need to
  1028.         have it enabled...
  1029.  
  1030.  
  1031.      Why are my NFS files all read only ?
  1032.         The Linux NFS server defaults to read only. RTFM the `exports'
  1033.         and nfsd manual pages. With non Linux servers you may also need
  1034.         to alter /etc/exports
  1035.  
  1036.  
  1037.  
  1038.   13.5.  slip questions:
  1039.  
  1040.  
  1041.  
  1042.      What do I do if I don't know my slip servers address ?
  1043.         dip doesn't really need to know the address of your slip server
  1044.         for slip to function. The remote option was added as a
  1045.         convenience so that dip could automate the ifconfig and route
  1046.         commands for you. If you don't know, and cannot find out the
  1047.         address of your slip server then Peter D. Junger
  1048.         Junger@samsara.law.cwru.edu has suggested that he simply used
  1049.         his own address wherever a dip script called for a remote
  1050.         address. This is a small kludge but it works ok, as the server's
  1051.         address never actually appears in the slip headers anyway.
  1052.  
  1053.  
  1054.      `dip' only works for root. How do I make it work for others?
  1055.         dip needs to be suid root to perform some of the tasks necessary
  1056.         to do its job, so check that the file permissions of dip are
  1057.         6750. On some systems dip is actually a symbolic link to another
  1058.         file, such as dip.uri, if this is how yours is setup then make
  1059.         the change to that file instead. Something like `chmod 6750 dip'
  1060.         should work ok. Check also that dip is owned by root: `chown
  1061.         root:dip dip'.
  1062.  
  1063.  
  1064.      With SLIP I can ping my server, and other hosts, but telnet or ftp
  1065.         don't
  1066.         work."  This is most likely caused by a disagreement on the use
  1067.         of header compression between your server and your machine.
  1068.         Double check that both ends either are, or are not, using
  1069.         compression. They must match.
  1070.  
  1071.  
  1072.      How can I hang up the phone line when I'm done using SLIP?
  1073.         If you use dip to dial out on the SLIP line, just `dip -k'
  1074.         should do the trick. If not, try to kill the dip process that is
  1075.         running. When dip dies it should hang up the call. To give it
  1076.         the best chance to clean up after itself, try killing the
  1077.         process in the following sequence: `kill <pid>', `kill -hup
  1078.         <pid>', and finally, if the dip process still refuses to die,
  1079.         try `kill -9 <pid>'. The same philosophy should be applied to
  1080.         all unix processes that you are attempting to kill.
  1081.  
  1082.  
  1083.      I see a lot of overrun errors on my slip port, why ?
  1084.         The older network tools incorrectly report number of packets
  1085.         compressed as the number of packets overrun. This has been
  1086.         corrected, and shouldn't occur of you are running the new
  1087.         version kernel and tools. If it still is it probably indicates
  1088.         that your machine isn't keeping up with the rate of data
  1089.         incoming. If you are not using 16550AFN UARTs then you should
  1090.         upgrade to them. 16450, or 8250 generate an interrupt for every
  1091.         character they receive and are therefore very reliant on the
  1092.         processor to be able to find time to stop what it is doing an
  1093.         collect the character from them to ensure none get lost. The
  1094.         16500AFN has a 16 character FIFO, and they only generate
  1095.         interrupts when the FIFO is nearly full, or when they have had
  1096.         character waiting, this means that less interrupts get generated
  1097.         for the same amount of data, and that less time is spent
  1098.         servicing your serial port. If you want to use multiple serial
  1099.         ports you should mandatorily upgrade to 16550AFN UARTs anyway.
  1100.  
  1101.  
  1102.      Can I use two slip interfaces ?
  1103.         Yes. If you have, for example, three machines which you would
  1104.         like to interconnect, then you most certainly could use two slip
  1105.         interfaces on one machine and connect each of the other machines
  1106.         to it. Simply configure the second interface as you did the
  1107.         first. NOTE that the second interface will require a different
  1108.         IP address to the first. You may need to play with the routing a
  1109.         bit to get it to do what you want, but it should work.
  1110.  
  1111.  
  1112.      I have a multiport i/o card, how do I use more than 4 slip ports ?
  1113.         The kernel slip comes with a default of a maximum of 4 slip
  1114.         devices configured, this is set in the
  1115.         /usr/src/linux/drivers/net/slip.h file.  To increase it, say to
  1116.         16, change the #define SL_NRUNIT to 16, in place of the 4 that
  1117.         will be there. You also need to edit
  1118.         /usr/src/linux/drivers/net/Space.c and add sections for sl4, sl5
  1119.         etc. You can copy the existing driver definition as a template
  1120.         to make it easier. You will need to recompile the kernel for the
  1121.         change to take effect.
  1122.  
  1123.  
  1124.  
  1125.   14.  Known Bugs.
  1126.  
  1127.   The Linux networking code is still an evolving thing. It still has
  1128.   bugs though they are becoming less frequently reported now. The Linux
  1129.   Networking News (http://iifeak.swan.ac.uk/NetNews.html) is a World
  1130.   Wide Web page maintained by Alan Cox which contains information on the
  1131.   status of the NET-3 networking code. You can obtain information on
  1132.   what is known and what isn't, by reading the
  1133.   /usr/src/linux/net/inet/README file that accompanies the kernel
  1134.   source, or by joining the NET channel.
  1135.  
  1136.  
  1137.   15.  Copyright Message.
  1138.  
  1139.   The NET-2-HOWTO is copyright by Terry Dawson and Matt Welsh. A
  1140.   verbatim copy of this document may be reproduced and distributed in
  1141.   any medium, physical or electronic without permission of the authors.
  1142.   Translations are similarly permitted without express permission if
  1143.   such translations include a notice stating who performed the
  1144.   translation, and that it is a translation.  Commercial redistribution
  1145.   is allowed and encouraged, however, the authors would like to be
  1146.   notified of any such distributions.
  1147.  
  1148.   Short quotes may be used without prior consent by the authors.
  1149.   Derivative works and partial distributions of the NET-2-HOWTO must
  1150.   include either a verbatim copy of this file, or make a verbatim copy
  1151.   of this file available.  If the latter is the case, a pointer to the
  1152.   verbatim copy must be stated at a clearly visible place.
  1153.  
  1154.   In short, we wish to promote dissemination of this information through
  1155.   as many channels as possible. However, we wish to retain copyright on
  1156.   this HOWTO document, and would like to be notified of any plans to
  1157.   redistribute it.  Further we desire that ALL information provided in
  1158.   this HOWTO be disseminated.
  1159.  
  1160.   If you have any questions relating to the conditions of this
  1161.   copyright, please contact Matt Welsh, the Linux HOWTO coordinator, at:
  1162.   mdw@sunsite.unc.edu
  1163.   16.  Miscellaneous, and Acknowledgements.
  1164.  
  1165.   This HOWTO has been completely rewritten using the new smgl tools that
  1166.   Matt Welsh put together. The tools seem to work just fine, and they
  1167.   are pretty simple to use. There are so many people who have
  1168.   contributed comments and suggestions for this update that I have
  1169.   forgotten who you are. Thanks.
  1170.  
  1171.   Please, if you have any comments or suggestions then mail them to me.
  1172.   I'm fairly busy these days, so I might not get back to you straight
  1173.   away, but I will certainly consider any suggestion you have.
  1174.  
  1175.   The Linux networking code has come a long way, and it hasn't been an
  1176.   easy trip, but the developers, all of them, have done an excellent job
  1177.   in getting together something that is functional, versatile, flexible,
  1178.   and free for us to use. We all owe them a great debt of thanks. Linus,
  1179.   Ross, Fred, Alan, the Alpha/Beta testers, the tools developers, and
  1180.   those offering moral support have all contributed to the code as it is
  1181.   today.
  1182.  
  1183.   For those that have an itch they want to scratch, happy hacking, here
  1184.   it is.
  1185.  
  1186.   73
  1187.  
  1188.   Terry Dawson, vk2ktj.
  1189.  
  1190.   <terryd@extro.ucc.su.oz.au>, or <terry@orac.dn.telecom.com.au>
  1191.  
  1192.